package com.xpc.rpc.common.enums;


public enum SerializationType {


    JDK(1,"jdk"),
    JSON(2,"json");

    private Integer type;

    private String value;

    SerializationType(Integer type,String value) {
        this.type = type;
        this.value = value;
    }

    public static String getVal(Integer k) {
        SerializationType[] values = SerializationType.values();
        for (SerializationType serializationType : values) {
            if (serializationType.getType().equals(k)) {
                return serializationType.getValue();
            }
        }
        return null;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }
}
